package com.itheima.myextends.入门练习_02;

public class Father {
    String name;
    int age;

    public void eat(){
        System.out.println("吃饭");
    }
    public void sleep(){
        System.out.println("睡觉");
    }
}
//测试类
class Demo{
    public static void main(String[] args) {
       Son1 s1 = new Son1();
        System.out.println("大儿子要做的事");
       s1.eat();
       s1.coding();
       Son2 s2 = new Son2();
        System.out.println("小儿子要做的事");
       s2.sleep();
       s2.play();
    }
}
